<?php

/**
 * @author shuang
 * @date 2016-10-30 20:21:31
 */
use yii\helpers\ArrayHelper;
use yii\helpers\Url;

echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["account/payinfo"]), "title" => "充值明细"]);
?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12 well ibox float-e-margins">
            <div class="ibox-title">在线充值 </div>
            <div class="well-content ibox-content">
                <form  id="payForm" name="payForm" method="post" action="<?php echo Url::toRoute(["payment"]); ?>" target="_blank">
                    <input name="pay_order_no" type="hidden" id="pay_order_no" value="<?php echo $res->id; ?>" />
                    <input name="pay_order_amount" type="hidden" id="pay_order_amount" value="<?php echo $res->amount; ?>" />
                    <input name="pay_user_name" type="hidden" id="pay_user_name" value="<?php echo $res->username; ?>" />
                    <input id="pay_subject" name="pay_subject" type="hidden" value="<?php echo $res->type; ?>" />
                    <input name="isupgrade" type="hidden" value="<?php echo $res->isupgrade; ?>" />
                    <table>
                        <tr>
                            <td>用户名：
                            </td>
                            <td>&nbsp;&nbsp;
                                <span id="txtname"><?php echo $res->username; ?></span>
                            </td>
                        </tr>
                        <tr>
                            <td>订单号：
                            </td>
                            <td>&nbsp;&nbsp;
                                <span id="txtorderno"><?php echo $res->id; ?></span>
                            </td>
                        </tr>
                        <tr>
                            <td>金额：
                            </td>
                            <td>&nbsp;&nbsp;
                                <span id="txtmoney"><?php echo $res->amount; ?></span> 元
                            </td>
                        </tr>
                        <tr>
                            <td>状态：
                            </td>
                            <td>&nbsp;&nbsp;
                                <span id="labStatus"><?php echo ArrayHelper::getValue(frontend\models\WB_UserOrder::$order_status, $res->status); ?></span> 
                            </td>
                        </tr>
                        <?php if ($res->status !== 2): ?>
                            <tr>
                                <td></td>
                                <td><input name="btnSubmit" type="submit" id="btnSubmit" class="left btn btn-info  btn-sm" value="确认支付" /></td>
                            </tr>
                        <?php endif; ?>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>